
******* Dofile INFORMAL GOVERNANCE AND TRANSNATIONAL ACCESS IN WORLD POLITICS  *******************

**** 09 sept 2024 ****
**** STATA 18.0 SE ***




**************************************************************************************************************************************************
************************************ REGRESSION TABLES *******************************************************************************************
**************************************************************************************************************************************************

*** USE ********************** 
*** INSERT own path **********
*** IIGO_TNA_data.dta  *******


use " IIGO_TNA_data.dta", clear


*****************************************************************************************************************************************************
*** Table 1 Regression **** *************************************************************************************************************************


*** Descriptives ***

pwcorr tna_accessI  security hi_pol Member gdp_cwdi democracy NGO NestedFIGO hostFIGO_lowaccess hostFIGO_hiaccess   media_vi Estab 


*** Model 1 Table 1 

logit tna_accessIIGO  hi_pol  Member  democracy NestedFIGO  NGO media_vi Estab , vce(rob) iterate(40)
estat ic
mat es_ic = r(S)
local AIC : display %4.1f es_ic[1,5]

outreg  using IIGO_TNA_Tab1.doc,   bdec(3) varlabels starlevels(10 5 1)summstat(N \  ll )  addrows("AIC", "`AIC'") squarebrack se 

*** Model 2 

logit tna_accessIIGO  security  Member  democracy NestedFIGO NGO   media_vi Estab , vce(rob) iterate(40)
estat ic
mat es_ic = r(S)
local AIC : display %4.1f es_ic[1,5]

outreg  using IIGO_TNA_Tab1.doc,   bdec(3) varlabels starlevels(10 5 1)summstat(N \  ll )  addrows("AIC", "`AIC'") squarebrack se merge

*** Model 3

logit tna_accessIIGO  hi_pol  Member democracy  hostFIGO_lowaccess hostFIGO_hiaccess  NGO media_vi Estab , vce(rob) iterate(40)

estat ic
mat es_ic = r(S)
local AIC : display %4.1f es_ic[1,5]

outreg  using IIGO_TNA_Tab1.doc,   bdec(3) varlabels starlevels(10 5 1)summstat(N \  ll )  addrows("AIC", "`AIC'") squarebrack se merge

*** Model 4 

logit tna_accessIIGO  hi_pol  Member  gdp_cwdi  hostFIGO_lowaccess hostFIGO_hiaccess  NGO  media_vi Estab , vce(rob) iterate(40)

estat ic
mat es_ic = r(S)
local AIC : display %4.1f es_ic[1,5]

outreg  using IIGO_TNA_Tab1.doc,   bdec(3) varlabels starlevels(10 5 1)summstat(N \  ll )  addrows("AIC", "`AIC'") squarebrack se merge


*** Model 2 with GDP instead of democracy
*** logit tna_accessIIGO  security  Member  gdp_cwdi NestedFIGO NGO   media_vi Estab , vce(rob) iterate(40)
*** estat ic
*** mat es_ic = r(S)
*** local AIC : display %4.1f es_ic[1,5]



****************************************************************************************************************************************************
*** Table 2 Regression *****************************************************************************************************************************


***** Table 2

*** Model 5

logit tna_accessIIGO  c.env##c.Member  NGO  hostFIGO_lowaccess hostFIGO_hiaccess   media_vi Estab  , vce(rob) iterate(40)
estat ic
mat es_ic = r(S)
local AIC : display %4.1f es_ic[1,5]

outreg  using IIGO_TNA_Tab2.doc,   bdec(3) varlabels starlevels(10 5 1)summstat(N \  ll )  addrows("AIC", "`AIC'") squarebrack se 

*** Model 6

logit tna_accessIIGO c.env##c.democracy   Member NGO  hostFIGO_lowaccess hostFIGO_hiaccess   media_vi Estab  , vce(rob) iterate(40)
estat ic
mat es_ic = r(S)
local AIC : display %4.1f es_ic[1,5]

outreg  using IIGO_TNA_Tab2.doc,   bdec(3) varlabels starlevels(10 5 1)summstat(N \  ll )  addrows("AIC", "`AIC'") squarebrack se merge

*** Model 7 
logit tna_accessIIGO  c.econ##c.democracy   Member NGO hostFIGO_lowaccess hostFIGO_hiaccess   media_vi Estab  , vce(rob) iterate(40)
estat ic
mat es_ic = r(S)
local AIC : display %4.1f es_ic[1,5]

outreg  using IIGO_TNA_Tab2.doc,   bdec(3) varlabels starlevels(10 5 1)summstat(N \  ll )  addrows("AIC", "`AIC'") squarebrack se merge

*** Model 8 

logit tna_accessIIGO  c.econ##c.media_vi   Member NGO  hostFIGO_lowaccess hostFIGO_hiaccess    Estab  , vce(rob) iterate(40)
estat ic
mat es_ic = r(S)
local AIC : display %4.1f es_ic[1,5]

outreg  using IIGO_TNA_Tab2.doc,   bdec(3) varlabels starlevels(10 5 1)summstat(N \  ll )  addrows("AIC", "`AIC'") squarebrack se merge

*** Model 9

logit tna_accessIIGO  c.dem_lo##c.media_vi  Memb NGO hi_pol  hostFIGO_lowaccess hostFIGO_hiaccess    Estab  , vce(rob) iterate(40)
estat ic
mat es_ic = r(S)
local AIC : display %4.1f es_ic[1,5]

outreg  using IIGO_TNA_Tab2.doc,   bdec(3) varlabels starlevels(10 5 1)summstat(N \  ll )  addrows("AIC", "`AIC'") squarebrack se merge

*** Model 10

logit tna_accessIIGO  c.gdp_lo##c.Memb  media_vi  NGO  hi_pol media_vi      hostFIGO_lowaccess hostFIGO_hiaccess    Estab  , vce(rob) iterate(40)
estat ic
mat es_ic = r(S)
local AIC : display %4.1f es_ic[1,5]

outreg  using IIGO_TNA_Tab2.doc,   bdec(3) varlabels starlevels(10 5 1)summstat(N \  ll )  addrows("AIC", "`AIC'") squarebrack se merge

*** Model 11

logit tna_accessIIGO  c.gdp_lo##c.media_vi  Memb NGO hi_pol hostFIGO_lowaccess hostFIGO_hiaccess    Estab  , vce(rob) iterate(40)
estat ic
mat es_ic = r(S)
local AIC : display %4.1f es_ic[1,5]

outreg  using IIGO_TNA_Tab2.doc,   bdec(3) varlabels starlevels(10 5 1)summstat(N \  ll )  addrows("AIC", "`AIC'") squarebrack se merge


*** Model 12 

logit tna_accessIIGO  c.media_lo##c.Memb democracy  NGO hi_pol      hostFIGO_lowaccess hostFIGO_hiaccess    Estab  , vce(rob) iterate(40)
estat ic
mat es_ic = r(S)
local AIC : display %4.1f es_ic[1,5]

outreg  using IIGO_TNA_Tab2.doc,   bdec(3) varlabels starlevels(10 5 1)summstat(N \  ll )  addrows("AIC", "`AIC'") squarebrack se merge



*****************************************************************************************************************************************************

******************* FIGURES  ************************************************************************************************************************

*****************************************************************************************************************************************************



**** Figure 1   June 2024

***** Note: two IIGOS are active in more than one issue area. To represent the seocnd issue area as well, N in the following graph is higher than the number of IIGOs
*** USE DIFFERENT FILE ********************

use "IIGO_TNA_Fig1_issue.dta", clear

keep  if nonex_IIGO==0
gen access_yes=0
replace access_y=1 if tna_accessIIGO==1
gen access_no=0
replace access_n=1 if tna_accessIIGO==0
gen all=access_yes+access_no
gen allIIGO=tna_a if nonex_IIGO==0
recode allI (0=1) 
collapse (sum) tna_accessIIGO access_y access_n allII all  , by(issue1_new)
gen access_share= (access_y/(access_y + access_n))*100
gen ln_all= ln(all+1)

graph hbar (sum) access_y access_n if issue1_new<5 , over(issue1_new, ) stack percentage   bar(1, fcolor(gs6) lcolor(gs6)) bar(2, fcolor(gs12) lcolor(gs12)) blabel(bar, size(small) position(Inside) orientation(horizontal) format(% 9.0f)) ylabel(  , labsize(small)) legend(size(small) ) graphregion(fcolor(white) lcolor(white)) plotregion(lcolor(black) lwidth(thin))
     
clear


**** Figure 2  **************


use " IIGO_TNA_data.dta", clear

gen access_yes=0
replace access_y=1 if tna_accessIIGO==1
gen access_no=0
replace access_n=1 if tna_accessIIGO==0
gen all=access_yes+access_no
collapse (sum) tna_accessIIGO access_y access_n allII all  , by(memb_c)
gen access_share= (access_y/(access_y + access_n))*100
gen ln_all= ln(all+1)

graph hbar (sum) access_y access_n  , over(memb, ) stack percentage   bar(1, fcolor(gs6) lcolor(gs6)) bar(2, fcolor(gs12) lcolor(gs12)) blabel(bar, size(small) position(Inside) orientation(horizontal) format(% 9.0f)) ylabel(  , labsize(small)) legend(size(small) ) graphregion(fcolor(white) lcolor(white)) plotregion(lcolor(black) lwidth(thin))

clear


**** Figure 3 ****************

**** 3a - upper panel ********

use " IIGO_TNA_data.dta", clear

gen access_yes=0
replace access_y=1 if tna_accessIIGO==1
gen access_no=0
replace access_n=1 if tna_accessIIGO==0
gen all=access_yes+access_no
collapse (sum) tna_accessIIGO access_y access_n allII all  , by(NestedFIGO)
gen access_share= (access_y/(access_y + access_n))*100
gen ln_all= ln(all+1)

graph hbar (sum) access_y access_n  , over(NestedFIGO, ) stack percentage   bar(1, fcolor(gs6) lcolor(gs6)) bar(2, fcolor(gs12) lcolor(gs12)) blabel(bar, size(small) position(Inside) orientation(horizontal) format(% 9.0f)) ylabel(  , labsize(small)) legend(size(small) ) graphregion(fcolor(white) lcolor(white)) plotregion(lcolor(black) lwidth(thin))

clear

**** 3b - lower panel 


drop if NestFIGO_cat==8
drop if NestFIGO_cat==5
gen access_yes=0
replace access_y=1 if tna_accessIIGO==1
gen access_no=0
replace access_n=1 if tna_accessIIGO==0
gen all=access_yes+access_no

**** cave: correct manually for ASEAN EU combined, open (mutual nesting)

collapse (sum) tna_accessIIGO access_y access_n allII all  , by(NestFIGO_cat)
gen access_share= (access_y/(access_y + access_n))*100
gen ln_all= ln(all+1)

graph hbar (sum) access_y access_n  , over(NestFIGO_cat, sort(access_sh)descending) stack percentage   bar(1, fcolor(gs6) lcolor(gs6)) bar(2, fcolor(gs12) lcolor(gs12)) blabel(bar, size(small) position(Inside) orientation(horizontal) format(% 9.0f)) ylabel(  , labsize(small)) legend(size(small) ) graphregion(fcolor(white) lcolor(white)) plotregion(lcolor(black) lwidth(thin))

clear 




********************************************
******************* APPENDIX ***************


***** Figure A1 ***********************

use "IIGO_TNA_Fig1_issue.dta", clear
graph bar (count), over(issue)

***** Figure A2 ***********************

use " IIGO_TNA_data.dta", clear
graph bar (count), over(memb_cat)

***** Figure A3 ***********************

graph hbar (mean) democracy, over(IIGO, sort(democracy) descending label(labsize(tiny))) ytitle(, size(zero)) ylabel(, labsize(vsmall))

***** Figure A4 ***********************

graph hbar (mean) gdp_cw, over(IIGO, sort(gdp_cw) descending label(labsize(tiny))) ytitle(, size(zero)) ylabel(, labsize(vsmall))

***** Figure A5 ***********************

collapse (sum) tna_accessIIGO allII , by(estab_cat)
twoway (bar tna_accessIIGO estab_cat, fcolor(gs8) lcolor(gs8) barwidth(0.7))(bar allII estab_cat, fcolor(gs13) lcolor(gs13) barwidth(0.7)), ylabel(, angle(horizontal) nogrid) xlabel(1(1)4, angle(vertical) valuelabel) graphregion(fcolor(white) lcolor(white)) plotregion(lcolor(black))

clear

***** Figure A6 ***********************

use " IIGO_TNA_data.dta", clear
graph bar (count), over(media_cat)

***** Figure A7 ***********************

graph hbar (mean) NGO_ECO, over(IIGO, sort(NGO_ECO) descending label(labsize(tiny))) ytitle(, size(zero)) ylabel(, labsize(vsmall))



***** Figure A8 ***********************


gen access_yes=0
replace access_y=1 if tna_accessIIGO==1
gen access_no=0
replace access_n=1 if tna_accessIIGO==0

gen all=access_yes+access_no
collapse (sum) tna_accessIIGO access_y access_n allII all  , by(dem_cat3)
gen access_share= (access_y/(access_y + access_n))*100
gen ln_all= ln(all+1)

graph hbar (sum) access_y access_n  , over(dem_cat3, ) stack percentage   bar(1, fcolor(gs6) lcolor(gs6)) bar(2, fcolor(gs12) lcolor(gs12)) blabel(bar, size(small) position(Inside) orientation(horizontal) format(% 9.0f)) ylabel(  , labsize(small)) legend(size(small) ) graphregion(fcolor(white) lcolor(white)) plotregion(lcolor(black) lwidth(thin))

clear


*********************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************

